import {
  addAttentionApi
} from '@/apis/attention'
import {
  ElMessage
} from 'element-plus';
import {
  useUserStore
} from "@/store/user";

export default function useAttention(props) {
  const userStore = useUserStore();
  console.log(props);


  const addAttention = async () => {
    const res = await addAttentionApi(userStore.userInfo.id, props.list.userId);

    ElMessage({
      type: 'success',
      message: res.data
    })

  }

  return {
    addAttention
  }

}